F90=gfortran
FFLAGS= -O2 -fopenmp -fno-range-check -ffree-line-length-0 

LIMBES_LIB_SOURCES = LIMBES_mod_var.f90 LIMBES_mod_fluid_config.f90 LIMBES_boundary.f90 LIMBES_write_macro.f90 LIMBES_transport.f90 LIMBES_macro.f90 LIMBES_init.f90 LIMBES_feq.f90 LIMBES_dvm.f90 LIMBES_collision.f90 LIMBES_check_conserving.f90 LIMBES_force.f90

LIMBES_LIB_OBJECTS = LIMBES_mod_var.o LIMBES_mod_fluid_config.o LIMBES_boundary.o LIMBES_write_macro.o LIMBES_transport.o LIMBES_macro.o LIMBES_init.o LIMBES_feq.o LIMBES_dvm.o LIMBES_collision.o LIMBES_check_conserving.o LIMBES_force.o


lib:  $(LIMBES_LIB_OBJECTS)
	ar -r  liblimbes.a $(LIMBES_LIB_OBJECTS)
	(cp liblimbes.a ../lib )
	(cp *.mod ../include)

$(LIMBES_LIB_OBJECTS): $(LIMBES_LIB_SOURCES)
	$(F90) $(FFLAGS) -c $(LIMBES_LIB_SOURCES) 

clean:
	rm -rf liblimbes.a $(LIMBES_LIB_OBJECTS) *.mod *.f90~
